<template>
  <el-form-item label="触发选项">
    <el-select v-model="currValue" @change="onChange">
      <el-option v-for="(item, index) in list" :key="item.value + index" :label="item.label" :value="item.value"></el-option>
    </el-select>
  </el-form-item>
</template>

<script>
export default {
  name: 'interaction-tab',
  cnName: '选项卡交互',
  inject: ['wrapper'],
  props: {
    options: Object
  },
  data() {
    return {
      currValue: ''
    }
  },
  methods: {
    onChange() {}
  },
  computed: {
    list() {
      const id = this.options.id
      const singleRef =this.wrapper.$refs['editSingle' + id]
      if(singleRef) {
        const compRef = singleRef[0].$refs[id]
        return compRef.cptData.options
      }
      return []
    }
  }
}
</script>


